<chapter xml:id="utf16.status.h">
<title><tt>__vic/utf16/status.h</tt></title>


<chapter xml:id="utf16--status">
<title><tt>utf16::status</tt></title>

<code-block lang="C++">
enum class utf16::status : unsigned char
{
    ok = 0,
    eof,
    // Errors
    truncated_code_unit,
    truncated_code_point,
    invalid_sequence
};
using utf16::status_t = utf16::status; // for C++98
</code-block>

<p>Values returned by <xref to="utf16--reader"/> <tt>parse()</tt> function.</p>

<list style="bulleted">
    <item><tt>ok</tt> - code point successfully read</item>
    <item><tt>eof</tt> - no more code points to read</item>
    <item><tt>truncated_code_unit</tt> - incomplete code unit</item>
    <item><tt>truncated_code_point</tt> - incomplete code point</item>
    <item><tt>invalid_sequence</tt> - the bytes don't represent any valid
        UTF-16 code point</item>
</list>

</chapter>


<chapter xml:id="utf16--is_error">
<title><tt>utf16::is_error()</tt></title>

<code-block lang="C++">
constexpr bool utf16::is_error(utf16::status s);
</code-block>

<p>Returns <tt>false</tt> for <tt>utf16::status::ok</tt> and
<tt>utf16::status::eof</tt> values. <tt>true</tt> is returned otherwise.</p>

</chapter>


</chapter>
